package com.huanong.controller;
/*
 *@Author:anran
 *@Date:2020/12/7
 *@Version 1.0
 */

import com.huanong.common.grace.result.GraceJSONResult;
import com.huanong.pojo.Company;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;

@Api(value = "公司介绍信息管理",tags = {"公司介绍信息管理"})
@RequestMapping("company")
@CrossOrigin(origins = "*")
public interface CompanyControllerApi {

    @ApiOperation(value = "查询方法接口",notes = "查询公司介绍信息",httpMethod = "GET")
    @GetMapping("/queryCompany")
    public GraceJSONResult query();

    @ApiOperation(value = "根据id查询方法接口",notes = "根据id查询公司介绍信息",httpMethod = "GET")
    @GetMapping("/queryCompanyById")
    public GraceJSONResult queryById(@RequestParam("CyId") Integer CyId);

    @ApiOperation(value = "新增方法接口",notes = "新增公司介绍信息",httpMethod ="POST")
    @PostMapping("/addCompany")
    public GraceJSONResult add(@RequestBody Company company);

    @ApiOperation(value = "删除方法接口",notes = "删除公司介绍信息",httpMethod = "GET")
    @GetMapping("/deleteCompany")
    public GraceJSONResult delete(@RequestParam("CyId") Integer CyId);

    @ApiOperation(value = "更新公司介绍信息接口",notes = "更新公司信息",httpMethod = "POST")
    @PostMapping("/updateCompany")
    GraceJSONResult update(@RequestBody Company company);

    @ApiOperation(value = "查询最新公司简介的方法接口",notes = "查询最新公司简介的方法接口",httpMethod = "GET")
    @GetMapping("/queryNewMessage")
    public GraceJSONResult queryNewMessage();

}
